from django.db import models

from utils.mixins.common_mixins.models import BaseModel


# Create your models here.
class FileManage(BaseModel):
    file_name = models.CharField(max_length=255, help_text="文件名称", db_column="file_name", null=False, blank=False)
    file_desc = models.CharField(max_length=255, help_text="文件描述", db_column="file_desc", null=True, blank=True)
    file_path = models.CharField(max_length=255, help_text="文件路径", db_column="file_path", null=False, blank=False)
    save_name = models.CharField(max_length=255, help_text="保存名称", db_column="save_name", null=False, blank=False)
    file_tag = models.CharField(max_length=255, help_text="文件标签", db_column="file_tag", null=False, blank=False)
    upload_user = models.CharField(max_length=255, help_text="上传用户", db_column="upload_user", null=False,
                                   blank=True)

    class Meta:
        db_table = 'file_manage'
        verbose_name = '附件表'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.file_name
